import { Alert } from 'react-native';
import axios from '../../util/http';

export const userFocusPhotos = async photos => {
    try {
        const res = await axios.post('/userFocusPhotos/focus', {
            photos,
        });
        return res.data;
    } catch (e) {
        Alert.alert('请求失败', e.message);
        return null;
    }
};
export const userUnfocusPhotos = async photos => {
    try {
        const res = await axios.post('/userFocusPhotos/unfocus', {
            photos,
        });
        return res.data;
    } catch (e) {
        Alert.alert('请求失败', e.message);
        return null;
    }
};

export const getMyFocusPhotosList = async () => {
    try {
        const res = await axios.post('/userFocusPhotos/list');
        return res.data;
    } catch (e) {
        Alert.alert('请求失败', e.message);
        return null;
    }
};
